'''
def greet2(name):
    print 'how are you' + name + '!'
def bye():
    print 'bye!'
def greet(name):
    print 'hello' + name + '!'
    greet2(name)
    print 'getting ready to say bye'
    bye()

print greet('chenqx')
'''
def sum(list):
    if list == []:
        return 0
    return list[0] + sum(list[1:])
print sum([1,2,3,4])
list2 = [1,2,3,4,5,6]
print list2[1:]
